<!DOCTYPE html>
<html>
  <head>
  <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
  
  <title>Tplay后台登录</title>
  <meta name="renderer" content="webkit">
  <meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
  <meta name="viewport" content="width=device-width, initial-scale=1.0, minimum-scale=1.0, maximum-scale=1.0, user-scalable=0">
  <link href="__PUBLIC__/layui/css/layui.css" rel="stylesheet" />
  <link rel="stylesheet" href="__CSS__/admin-1.css" media="all">
  <link rel="stylesheet" href="__CSS__/login-1.css" />
  <link rel="stylesheet" href="__CSS__/login2.css" />
  <link rel="stylesheet" href="__PUBLIC__/font-awesome/css/font-awesome.css"  />
  </head>
<body class="layui-layout-body">
  <!--<div id="LAY_app">-->
  <!--<div class="layadmin-user-login" id="LAY-user-login" style="display: none;">-->

  <!--<div class="layadmin-user-login-main">-->
    <!--<div class="layadmin-user-login-box layadmin-user-login-header">-->
      <!--<h2>Tplay后台管理</h2>-->
      <!--&lt;!&ndash;<p>体验ThinkPHP5+Layui2的极速双飞快感</p>&ndash;&gt;-->
    <!--</div>-->
    <!--<div class="layadmin-user-login-box layadmin-user-login-body layui-form">-->
      <!--<form class="layui-form" id="login">-->
        <!--<div class="layui-form-item">-->
          <!--<label class="layadmin-user-login-icon layui-icon layui-icon-username" for="LAY-user-login-username"><i class="fa fa-user"></i></label>-->
          <!--<input type="text" name="name" lay-verify="required" autocomplete="off" placeholder="用户名" class="layui-input" {notempty name="usermember"}value="{$usermember}"{/notempty}>-->
        <!--</div>-->
        <!--<div class="layui-form-item">-->
          <!--<label class="layadmin-user-login-icon layui-icon layui-icon-password" for="LAY-user-login-password"><i class="fa fa-unlock-alt"></i></label>-->
          <!--<input type="password" name="password" lay-verify="required" autocomplete="off" placeholder="密码" class="layui-input">-->
        <!--</div>-->
        <!--<div class="layui-form-item">-->
          <!--<label class="layadmin-user-login-icon layui-icon layui-icon-password" for="LAY-user-login-password"><i class="fa fa-code"></i></label>-->
          <!--<input type="text" name="captcha" lay-verify="required" autocomplete="off" placeholder="验证码" class="layui-input" style="width:62%;float: left;margin-right:11px;"><img src="{:captcha_src()}" alt="captcha" onclick="this.src='{:captcha_src()}?seed='+Math.random()" height="36" id="captcha" style="margin-top: 1px" />-->
        <!--</div>-->
        <!--<div class="layui-form-item">-->
          <!--<input type="checkbox" lay-skin="primary" title="记住账号" name="remember" value="1" {notempty name="usermember"}checked=""{/notempty}><div class="layui-unselect layui-form-checkbox" lay-skin="primary"><span>记住账号?</span><i class="layui-icon"></i></div>-->
        <!--</div>-->
        <!--<div class="layui-form-item">-->
          <!--<button class="layui-btn layui-btn-fluid" lay-submit lay-filter="login">登 入</button>-->
        <!--</div>-->
        <!--{:token('__token__', 'sha1')}-->
      <!--</form>-->
    <!--</div>-->
  <!--</div>-->
  <!---->
<!--</div>-->

<!--</div>-->

  <div id="box"></div>
  <div class="cent-box" style="margin-left: -240px;">
    <div class="cent-box-header">
      <h3 class="main-title">Tplay 后台系统</h3>
      <h2 class="sub-title"></h2>
    </div>
    <!--<form  id="login" action="/admin/common/login2" method="post">-->
    <form  id="login" action="" method="post">
      <div class="cont-main clearfix">
        <div class="index-tab">
          <div class="login form">
            <div class="group">
              <div class="group-ipt layui-icon" style="font-size: 18px; color: #0d957a;">
                &#xe612;<input type="text" name="name" id="username" class="ipt" placeholder="请输入您的用户名" required lay-verify="required" autocomplete="off">
              </div>
              <div class="group-ipt layui-icon" style="font-size: 18px; color: #0d957a;">
                &#xe64e;<input type="password" name="password" id="password" class="ipt" placeholder="输入您的登录密码" required lay-verify="required" autocomplete="off">
              </div>
              <div class="group-ipt layui-icon" style="font-size: 18px; color: #0d957a;">
                &#xe635;<input type="text" name="captcha" id="verify_img" class="ipt" placeholder="输入验证码" required  style="width:120px;" lay-verify="required" autocomplete="off">
                <img  src="{:captcha_src()}" alt="captcha"  width="160px" height="50px"  onclick="this.src='{:captcha_src()}?seed='+Math.random() "/>
              </div>
              <!--<div class="group-ipt layui-icon" style="font-size: 18px; color: #0d957a;">-->
                <!--&#xe635;<input type="text" name="captcha" id="verify_img" class="ipt" placeholder="输入验证码" required  style="width:120px;">-->
                <!--<img  src="picture/fd03c007b1e24fbca881f9fd7b353fb5.gif" alt="captcha"  width="160px" height="50px"  onclick="this.src=this.src+'?' "/>-->
              <!--</div>-->
              <!--<div class="layui-form-item">-->
                <!--<input type="checkbox" lay-skin="primary" title="记住账号" name="remember" value="1" {notempty name="usermember"}checked=""{/notempty}><div class="layui-unselect layui-form-checkbox" lay-skin="primary"><span>记住账号?</span><i class="layui-icon"></i></div>-->
              <!--</div>-->
            </div>
          </div>

          <div class=" layui-form-item button">
            <button type="submit" class="login-btn register-btn" id="button" lay-submit lay-filter="login">立即登录</button>
          </div>

        </div>
      </div>
    </form>
    <div class="footer">
      <p>系统版本号：<3.2.3> </p>
      <p>技术支持：Kervin QQ:363614740 2018</p>
    </div>

    <script src='__PUBLIC__/js/particles.js' type="text/javascript"></script>
    <script src='__PUBLIC__/js/background.js' type="text/javascript"></script>



<script src="__PUBLIC__/layui/layui.js"></script>
    <script src="__PUBLIC__/jquery/jquery-2.2.3.min.js"></script>
    <script>
        layui.use(['layer', 'form'], function() {
            var layer = layui.layer,
                $ = layui.jquery,
                form = layui.form;
            $(window).on('load', function() {
                form.on('submit(login)', function(data) {
                    $.ajax({
                        url:"{:url('admin/common/login2')}",
                        data:$('#login').serialize(),
                        type:'post',
                        async: false,
                        success:function(res) {
                          //alert(res.msg);
                            layer.msg(res.msg,{offset: '50px',anim: 1});
                            if(res.code == 1) {
                                setTimeout(function() {
                                    location.href = res.url;
                                }, 1500);
                            } else {
                                $('#captcha').click();
                            }
                        }
                    })
                    return false;
                });
            });
        });
    </script>
</body>
</html>